﻿using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace GanFengLogViewer
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var configuration = new ConfigurationBuilder()
                .SetBasePath(System.IO.Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json").Build();

            DbName = configuration["LogDB:Name"];
            DbPassword = configuration["LogDB:Password"];
        }

        public static string? DbName { get; private set; } = string.Empty;
        public static string? DbPassword { get; private set; } = string.Empty;
    }
}
